package cn.bluarry.donationuser.Respose;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;
import java.util.List;


@JsonInclude(JsonInclude.Include.NON_NULL)
public class ListUsersResponse<T> implements Serializable {
    private String resquestid;
    private List<T> Users;

    private Integer code;
    private String msg;




    public ListUsersResponse() { }
    public ListUsersResponse(String resquestid, List<T> users) {
        this.resquestid = resquestid;
        Users = users;
    }
    public ListUsersResponse(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getResquestid() {
        return resquestid;
    }

    public void setResquestid(String resquestid) {
        this.resquestid = resquestid;
    }

    public List<T> getUsers() {
        return Users;
    }

    public void setUsers(List<T> users) {
        Users = users;
    }

    public static <T> ListUsersResponse<T> createByerrorMsg(String msg){
        return new ListUsersResponse<>(-1,msg);
    }

}
